package com.example.stub.simulator;

import com.example.stub.SimulatorException;
import com.example.stub.SimulatorThread;
import com.example.terminal.TerminalClient;
import com.example.util.DataBuilder;

public class TerminalRegisterThread extends SimulatorThread {

	public TerminalRegisterThread(int no, int totalThread) throws Exception {
		super(no, totalThread);
	}

	@Override
	protected void execute() throws SimulatorException {
		try{
			TerminalClient client = new TerminalClient(DataBuilder.buildRandomMacAddress());
			client.start();
			client.register();
		}catch(Exception e){
			throw new SimulatorException(super.no, e);
		}
	}

}
